<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>内置对象</title>
</head>
<body>

</body>
<script>

    /*
    * 内置对象:
    *  1. String
    *      字符串长度
    *      字符串拼接
    *      字符串拆分
    *      字符串截取
    * */

    var str = new String("hello");
    var str2="world";

    document.write(str.length+"<br/>");
   var result= str.concat(" u !");
   document.write(result+"<br/>")

    var arr = result.split(' ');
    console.log(arr);

    var sub = result.substr(0,2); // [0,2)
    document.write(sub+"<br/>");

    var rel= result.replace("u","me")
    document.write(rel);
</script>
</html>